import { LogicEntity } from "./LogicEntity";
import { LogicTileEraseComponent } from "./LogicTileEraseComponent";
import {TileBlock} from "./Game/TileMatrix";
import { L2VMessageEnum } from "../Framework/Network/L2VMessageEnum";

export class LogicTileEntity extends LogicEntity {
    tileBlock:TileBlock = null;

    constructor()
    {
        super();
        this.addLogicComponent(new LogicTileEraseComponent());
    }

    /**
     * 获取X坐标
     */
    getX():number{
        return this.tileBlock.x;
    }

    /**
     * 获取Y坐标
     */
    getY():number{
        return this.tileBlock.y;
    }

    /**
     * 获取类型ID（目前0~3）
     */
    getValue():number{
        return this.tileBlock.value;
    }

    /**
     * 获取权重值（用于堆叠时使用）
     */
    getWeight():number{
        return this.tileBlock.weight;
    }
}
